package com.pan.behavioral.visitor.pattern.visit;

import com.pan.behavioral.visitor.pattern.Visitor;
import com.pan.behavioral.visitor.pattern.part.*;

import javax.swing.*;

public class FrameVisitor implements Visitor {

    private JFrame frame;{
        frame = new JFrame();
    }

    public JFrame getFrame() {
        return frame;
    }

    @Override
    public void visit(ColorPart part) {
        part.accept(this);
    }
    @Override
    public void visit(SizePart part) {
        part.accept(this);
    }

    @Override
    public void visit(ShapePart part) {
        part.accept(this);
    }

    @Override
    public void visit(SetClosePart part) {
        part.accept(this);
    }

    @Override
    public void visit(VisiblePart part) {
        part.accept(this);
    }
}
